/**
 * Generali Solutions d'assurances - Tous droits réservés &copy; 2007 - 2010
 */

package fr.generali.accueilclient.opt.detaildossier.builder;

import fr.generali.accueilclient.opt.detaildossier.om.ICriteresRecherchesDetailDossier;
import fr.generali.accueilclient.opt.detaildossier.om.impl.DTOCriteresRecherchesDetailDossier;

/**
 * @author Holmes Kelly
 */
public class DTOCriteresRecherchesDetailDossierBuilder extends
                DTOCriteresRecherchesDetailDossierBuilderBase<DTOCriteresRecherchesDetailDossierBuilder> {

    /**
     * constructeur
     */
    public DTOCriteresRecherchesDetailDossierBuilder() {
        super(new DTOCriteresRecherchesDetailDossier());
    }

    /**
     * @return DTOCriteresRecherchesDetailDossierBuilder
     */
    public static DTOCriteresRecherchesDetailDossierBuilder dTOCriteresRecherchesDetailDossier() {
        return new DTOCriteresRecherchesDetailDossierBuilder();
    }

    /**
     * @return DTOCriteresRecherchesDetailDossier
     */
    public ICriteresRecherchesDetailDossier build() {
        return getInstance();
    }
}

/**
 * @author Holmes Kelly
 * @param <GeneratorT>
 */
class DTOCriteresRecherchesDetailDossierBuilderBase<GeneratorT extends DTOCriteresRecherchesDetailDossierBuilderBase<GeneratorT>> {

    /**
     * instance
     */
    private ICriteresRecherchesDetailDossier instance;

    /**
     * @param aInstance instance
     */
    protected DTOCriteresRecherchesDetailDossierBuilderBase(ICriteresRecherchesDetailDossier aInstance) {
        instance = aInstance;
    }

    /**
     * @return instance
     */
    protected ICriteresRecherchesDetailDossier getInstance() {
        return instance;
    }

    /**
     * @param aValue identifiant dossier
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildIdentifiantDossier(String aValue) {
        instance.setIdentifiantDossier(aValue);

        return (GeneratorT ) this;
    }
}
